package com.superboo;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {


    /**
     * 定义视图层路由
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {

        //websocket相关的
        registry.addViewController("/ws").setViewName("/ws");
        registry.addViewController("/chat").setViewName("/chat");
    }

}
